.PHONY:all
all:ServerNetCald client_netcal

client_netcal:TcpClient.cc
	g++ -o $@ $^ -std=c++17 -ljsoncpp  
ServerNetCald:TcpServer.cc
	g++ -o $@ $^ -std=c++17 -lstdc++fs -ljsoncpp 

#发布功能
.PHONY:output
output:
	@mkdir output
	@mkdir -p output/bin
	@mkdir -p output/conf
	@mkdir -p output/log
	@cp ServerNetCald output/bin
	@cp client_netcal output/bin
	@cp test.conf output/conf
	@cp install.sh output/ 
	@cp uninstall.sh output/ 
	@tar czf output.tgz output


.PHONY:clean
clean:
	rm -rf client_netcal ServerNetCald output output.tgz
